package com.yunlankeji.stemcells.fragemt.home;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.yunlankeji.ganxibaozhijia.R;
import com.yunlankeji.stemcells.adapter.Fragment_organization_goodsAdapter;
import com.yunlankeji.stemcells.adapter.Fragment_organization_informationAdapter;
import com.yunlankeji.stemcells.model.request.Organization_goods;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

public class fragment_home_organization_goods extends Fragment {
    private Unbinder unbinder;
    @BindView(R.id.rv_organization_goods)
    RecyclerView rv_organization_goods;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {

        View view=inflater.inflate(R.layout.fragment_home_organization_goods,container,false);

        unbinder = ButterKnife.bind(this,view);

        List<Organization_goods>organization_goodsList = new ArrayList<>();


        Organization_goods organization_goods1 = new Organization_goods("华大基因儿童安全用药基因检测","¥300",R.mipmap.icon_p2);

        Organization_goods organization_goods2 = new Organization_goods("华大基华大基因成年人常见慢性病单项基因检测因儿童安全用药基因检测","¥300",R.mipmap.icon_p2);

        Organization_goods organization_goods3 = new Organization_goods("华大基华大基因成年人常见慢性病单项基因检测因儿童安全用药基因检测","¥300",R.mipmap.icon_p2);

        Organization_goods organization_goods4 = new Organization_goods("华大基华大基因成年人常见慢性病单项基因检测因儿童安全用药基因检测","¥300",R.mipmap.icon_p2);


        organization_goodsList.add(organization_goods1);

        organization_goodsList.add(organization_goods2);

        organization_goodsList.add(organization_goods3);

        organization_goodsList.add(organization_goods4);



        LinearLayoutManager layoutManager = new LinearLayoutManager(this.getActivity());

        rv_organization_goods.setLayoutManager(layoutManager);
        Fragment_organization_goodsAdapter fragment_organization_goodsAdapterAdapter=new Fragment_organization_goodsAdapter(organization_goodsList);
        rv_organization_goods.setAdapter(fragment_organization_goodsAdapterAdapter);
        return view;
    }
}
